interface SendResponseOptions {
	type: 'Success' | 'Fail';
	message?: string;
	data?: any;
}

export function sendResponse(options: SendResponseOptions): Promise<{ message: string | null; data: any; status: string }> {
	const response = {
		message: options.message ?? null,
		data: options.data ?? null,
		status: options.type,
	};

	return options.type === 'Success' ? Promise.resolve(response) : Promise.reject(response);
}

